<template>
	<view class="assessmentPart">
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :bar-width="140"
			active-color="#002A55"></u-tabs>
			
		<!-- 免费估值 -->
		<view class="quickValuation" v-if="current===0">
			<u-image mode="widthFix" src="https://pxhuodong.oss-cn-beijing.aliyuncs.com/ibuycar/swiper/assets-mian.png"></u-image>
			<view class="padding32">
				<u-cell-group>
					<u-cell-item center :value="assessInfo.carModel" :value-style="{'color':'#666'}" @click="clickCar"
						:arrow="true" title="车型">
					</u-cell-item>
					<u-cell-item center :value="assessInfo.date" :value-style="{'color':'#666'}" @click="clickDate"
						:arrow="true" title="上牌时间"></u-cell-item>
					<u-cell-item center value="" :arrow="false" title="行驶里程">
						<u-input slot="right-icon" v-model="assessInfo.mileage" input-align="right" type="digit"
						@click="checkbrand()" :disabled="inputAble" @blur="lichen()"	placeholder="请输入"  />
						<text style="margin-left: 8px;" slot="right-icon">万公里</text>
					</u-cell-item>
					<u-cell-item center :value="assessInfo.addresss" :value-style="{'color':'#666'}"
						@click="openLevel" :arrow="true" title="车辆所在地"></u-cell-item>
					<u-cell-item center value="" :arrow="false" title="满电续航">
						<u-input slot="right-icon" v-model="assessInfo.fullBatteryLife" input-align="right" @click="checkbrand()" :disabled="inputAble"
					@blur="mdxh"		type="number" placeholder="请输入" />
						<text style="margin-left: 8px;" slot="right-icon">KM</text>
					</u-cell-item>
				</u-cell-group>
			</view>
			<view class="page">
				<u-button type="primary" @click="quickValuationStart">查看估值报告</u-button>
			</view>
		</view>
		
		<!-- 精准定价 -->
		<view class="precisePricing" v-if="current===1">
			<u-image mode="widthFix" src="https://pxhuodong.oss-cn-beijing.aliyuncs.com/ibuycar/swiper/assets-jing.png"></u-image>
			<view class="padding32">
				<view style="border-radius: 20rpx;overflow: hidden;">
					<u-cell-group>
						<u-cell-item center :value="assessInfo2.carModel" :value-style="{'color':'#666'}" @click="clickCar"
							:arrow="true" title="车型">
						</u-cell-item>
						<u-cell-item center :value="assessInfo2.date" :value-style="{'color':'#666'}" @click="clickDate"
							:arrow="true" title="上牌时间"></u-cell-item>
						<u-cell-item center value="" :arrow="false" title="行驶里程">
							<u-input slot="right-icon" @click="checkbrand()" :disabled="inputAble" @blur="licheng1" v-model="assessInfo2.mileage" input-align="right" type="digit"
								placeholder="请输入" />
							<text style="margin-left: 8px;" slot="right-icon">万公里</text>
						</u-cell-item>
						<u-cell-item center :value="assessInfo2.addresss" :value-style="{'color':'#666'}"
							@click="openLevel" :arrow="true" title="车辆所在地"></u-cell-item>
						<u-cell-item center value=""  :arrow="false" title="满电续航">
							<u-input slot="right-icon" v-model="assessInfo2.fullBatteryLife" input-align="right" @click="checkbrand()" :disabled="inputAble"
								type="number" placeholder="请输入"  @blur="mdxh1" />
							<text style="margin-left: 8px;" slot="right-icon">KM</text>
						</u-cell-item>
					</u-cell-group>
				</view>
				<view style="border-radius: 20rpx;overflow: hidden;margin: 10rpx 0;">
					<u-cell-group>
						<u-cell-item center :value="assessInfo2.carCondition" @click="clickPopup('整车性能',carConditionList,'carCondition')" :arrow="true" title="整车性能">
						</u-cell-item>
						<u-cell-item center @click="clickPopup('三电情况',batteryConditionList,'batteryCondition')" :value="assessInfo2.batteryCondition" :arrow="true" title="三电情况">
						</u-cell-item>
						<u-cell-item center @click="clickPopup('内饰情况',carInteriorList,'carInterior')" :value="assessInfo2.carInterior"
							:arrow="true" title="内饰情况">
						</u-cell-item>
						<u-cell-item center @click="clickPopup('外观情况',carAppearanceList,'carAppearance')" :value="assessInfo2.carAppearance"
							:arrow="true" title="外观情况">
						</u-cell-item>
						<u-cell-item center @click="clickCarColor('车身颜色')" :value="assessInfo2.carColor" :arrow="true"
							title="车身颜色">
						</u-cell-item>
					</u-cell-group>
				</view>
				<view style="border-radius: 20rpx;overflow: hidden;">
					<u-cell-group>
						<u-cell-item center @click="clickPopup('使用性质',useNatureList,'useNature')" :value="assessInfo2.useNature"
							:arrow="true" title="使用性质">
						</u-cell-item>
						<u-cell-item center :arrow="false" title="过户次数">
							<u-input slot="right-icon" v-model="assessInfo2.transferTimes" input-align="right" type="number" @blur="ghcs"
								placeholder="请输入" />
							<text style="margin-left: 8px;" slot="right-icon">次</text>
						</u-cell-item>
					</u-cell-group>
				</view>
			</view>
			<view class="page jingzhunButton">
				<view class="_flex _justify_between">
					<!-- <view class="" style="width: 30%;">
						<u-button type="primary" plain @click="goJingzhunExample()">样例</u-button>
					</view> -->
					<view class="" style="width: 100%;">
						<u-button type="primary" @click="goJingzhunReport()">查看估值报告</u-button>
					</view>
				</view>
			</view>
		</view>
		
		
		<!-- 车况定价 -->
	<!-- 	<view class="" v-if="current===2">
			<u-image mode="widthFix" src="https://pxhuodong.oss-cn-beijing.aliyuncs.com/ibuycar/swiper/assets-kuang.png"></u-image>
			<view class="padding32">
				<view class="" @click="scanCode" style="position: relative;">
					<image src="../../static/upload.png" style="width: 100%;height: 200rpx;" mode="widthFix"></image>
					<view class="uploadTxt">
						请上传完整的行驶证/登记证（含VIN部分）进行授权查询
					</view>
				</view>
			</view>
			<view class="padding32">
				<u-cell-group>
					<u-cell-item center :value="assessInfo3.carModel" :value-style="{'color':'#666'}" @click="clickCar"
						:arrow="true" title="车辆型号">
					</u-cell-item>
					<u-cell-item center :value="assessInfo3.addresss" :value-style="{'color':'#666'}"
						@click="openLevel" :arrow="true" title="所在城市"></u-cell-item>
					<u-cell-item center :value="assessInfo3.date" :value-style="{'color':'#666'}" @click="clickDate"
						:arrow="true" title="首次上牌"></u-cell-item>
					<u-cell-item center value="" :arrow="false" title="行驶里程">
						<u-input slot="right-icon" v-model="assessInfo3.mileage" input-align="right" type="number"
							placeholder="请输入" />
						<text style="margin-left: 8px;" slot="right-icon">万公里</text>
					</u-cell-item>
					<u-cell-item center @click="clickPopup('使用性质',useNatureList,'useNature','3')" :value="assessInfo3.useNature"
						:arrow="true" title="使用性质">
					</u-cell-item>
					<u-cell-item center value="" :arrow="false" title="满电续航">
						<u-input slot="right-icon" v-model="assessInfo3.fullBatteryLife" input-align="right"
							type="number" placeholder="请输入" />
						<text style="margin-left: 8px;" slot="right-icon">KM</text>
					</u-cell-item>
				</u-cell-group>
			</view>
			<view class="page jingzhunButton">
				<view class="_flex _justify_between">
					<view class="" style="width: 100%;">
						<u-button type="primary" @click="goReport">查看估值报告</u-button>
					</view>
				</view>
			</view>
		</view>
		 -->
		<!-- 时间选择器 -->

		<u-picker mode="time" :defaultTime="defaultTime" :start-year="startYear" v-model="showDate" :params="params" @confirm="confirmDate">

		</u-picker>
		
		<!-- 其他 -->
		<u-popup v-model="showPopup" mode="bottom" :mask-close-able="false">
			<view class="poppupBox">
				<view class="popupTitleStyle">
					<view style="float:left" @click="showPopup=false">
						取消
					</view>
					<text>{{popupTitle}}</text>
				</view>
				<view class="poppupBoxlist">
					<view class="poppupBoxlist-li" :class="popupTitle=='使用性质'?'':'colorAcitv'" v-for="(item,index) in popupList" :key='index' @click="getData(item)">
						<text class="title-color" :style="{'margin-right':'20rpx','font-size':'32rpx'}">{{item.name1 || ''}}</text><text>{{item.name2 || item.name || ''}}</text>
					</view>
				</view>
			</view>
		</u-popup>
		
		<u-popup v-model="showCarColor" mode="bottom" :mask-close-able="false">
			<view class="poppupBox">
				<view class="popupTitleStyle">
					<view style="float:left" @click="showCarColor=false">
						取消
					</view>
					<text>{{carTitle}}</text>
				</view>
				<view class="carBox">
					<view class="carBoxlist" :style="{'background-color': item.color}" v-for="(item,index) in carColorList" :key='index' @click="getCarColor(item)">
						<text>{{item.name}}</text>
					</view>
				</view>
			</view>
		</u-popup>
		
		<!-- 地址选择 -->
		<level-linkage v-if="treeData.length>0" ref="levelLinkage" 
		            :pickerValueDefault="pickerValueDefault" 
		            :allData="treeData"
		            @onConfirm="onConfirm" themeColor='#007AFF'></level-linkage>
	</view>
</template>

<script>
	import levelLinkage from "@/components/three-level-linkage/linkage.nvue"
	import API from "@/api/morePage.js"
	export default {
		components: {
		    levelLinkage
		},
		data() {
			return {
				startYear:'',
				inputAble:true,
				pickerValueDefault: [0, 0],
				city:'',
				code: 0,
				treeData:[],
				
				showCarColor: false,
				carTitle: '车身颜色',
				popupTitle: '',
				showPopup: false,
				showDate: false,
				keyData:'',
				qufen:'',
				cityShow: false,
				carShow: false,
				popupList: [],
				useNatureList: [],
				carColorList: [
					{
						name:'白色',
						color:'#FFFAFA'
					},
					{
						name:'黑色',
						color:'#000'
					},
					{
						name:'银色',
						color:'#778899'
					},
					{
						name:'灰色',
						color:'#808080'
					},
					// {
					// 	name:'米色',
					// 	color:'#FFF5EE'
					// },
					{
						name:'红色',
						color:'#FF0000'
					},
					
					{
						name:'黄色',
						color:'#FFD700'
					},
					{
						name:'其他',
						color:'#FFFAFA'
					},
					
				],
				carConditionList: [],
				batteryConditionList: [],
				carAppearanceList: [],
				carInteriorList: [],
				defaultTime: '',
				params: {
					year: true,
					month: true,
				},
				list: [{
						name: '快速估值'
					},
					{
						name: '精准定价'
					},
					// {
					// 	typeName: '车况定价',
					// }
				],
				current: 0,
				assessInfo: {
					carModel: '请选择',
					brandId: '',
					seriesId:'',
					modelId:'',
					addresss: '请选择',
					cityId:'',
					date: '请选择',
					mileage: '', //行驶里程
					fullBatteryLife: '', //满电续航
				},
				assessInfo2: {
					carModel: '请选择',
					brandId: '',
					seriesId:'',
					modelId:'',
					addresss: '请选择',
					cityId:'',
					date: '请选择',
					mileage: '',
					fullBatteryLife: '',
					transferTimes: '',
					useNature: '请选择', 
					useNatureId:'',
					carColor: '请选择',
					batteryCondition: '请选择',
					batteryConditionId: '',
					carAppearance: '请选择',
					carAppearanceId:'',
					carInterior: '请选择',
					carInteriorId:'',
					carCondition: '请选择',
					carConditionId:''
				},
				assessInfo3: {
					vinCode: '',
					carModel: '请选择',
					brandId: '',
					seriesId:'',
					modelId:'',
					addresss: '请选择',
					cityId:'',
					date: '请选择',
					mileage: '', //行驶里程
					useNature: '请选择', //使用性质
					transferTimes: '', //过户次数
					fullBatteryLife: '', //过户次数
				},
			};
		},
		onShow() {
			const carType = getApp().globalData.carType
			console.log(carType)
			this.treeData = getApp().globalData.treeData
			if (carType) {
				if (this.current === 0) {
					this.startYear = carType.modelYear - 1;
					console.log(this.startYear)
					this.assessInfo.carModel = carType.modelName
					this.assessInfo.brandId = carType.brandId
					this.assessInfo.seriesId = carType.seriesId
					this.assessInfo.modelId = carType.modelId
					this.assessInfo.guidePrice = carType.guidePrice
					this.assessInfo.miitCruisingMileage = carType.miitCruisingMileage //续航
					this.assessInfo.modelYear = carType.modelYear - 1
					this.inputAble =false
					this.assessInfo.date = "请选择"
				} else if (this.current === 1) {
					this.startYear = carType.modelYear - 1;
					console.log(this.startYear)
					this.assessInfo2.carModel = carType.modelName
					this.assessInfo2.brandId = carType.brandId
					this.assessInfo2.seriesId = carType.seriesId
					this.assessInfo2.modelId = carType.modelId
					this.assessInfo2.guidePrice = carType.guidePrice
					this.assessInfo2.miitCruisingMileage = carType.miitCruisingMileage //续航
					this.assessInfo2.modelYear = carType.modelYear - 1
					this.inputAble =false
					this.assessInfo2.date = "请选择"
				} else {
					this.assessInfo3.carModel = carType.modelName
					this.assessInfo3.brandId = carType.brandId
					this.assessInfo3.seriesId = carType.seriesId
					this.assessInfo3.modelId = carType.modelId
				}
			} else {
				this.assessInfo.carModel = '请选择'
				this.inputAble =  true
			}
		},
		onUnload() {
			getApp().globalData.carType = ""
		},
		onLoad() {
			this.getAccurateValuationDict()
		},
		methods: {
			ghcs(e){
				console.log(e);
				if(e>5){
					this.assessInfo2.transferTimes = ""
					this.$u.toast('过户次数不能超过5次');
				}
			},
			checkbrand(){
				if(this.current == 0){
					if(this.assessInfo.carModel =='请选择'){
						this.$u.toast('请优先选择具体车型');
					}
				}
				if(this.current == 1){
					if(this.assessInfo2.carModel =='请选择'){
						this.$u.toast('请优先选择具体车型');
					}
				}
				
			},
			mdxh(e){
				console.log(e)
				let that = this
				console.log(e > parseInt(that.assessInfo.miitCruisingMileage))
				if( e > parseInt(that.assessInfo.miitCruisingMileage) ){
					that.assessInfo.fullBatteryLife = ""
					that.$u.toast('您输入的续航里程不在合理范围内');
				}
			},
			mdxh1(e){
				console.log(e)
				let that = this
				if(e> parseInt(that.assessInfo2.miitCruisingMileage)){
					that.assessInfo2.fullBatteryLife = ""
					that.$u.toast('您输入的续航里程不在合理范围内');
				}
			},
			lichen(e){
				console.log(e)
				if(e>30){
					this.assessInfo.mileage = ""
					this.$u.toast('行驶里程不能大于30');
				}
			},
			licheng1(e){
				console.log(e)
				if( e> 30){
					this.assessInfo2.mileage = ""
					this.$u.toast('行驶里程不能大于30');
				}
			},
			// 获取字典值
			getAccurateValuationDict(){
				API.getAccurateValuationDict({}).then(res=>{
					console.log(res)
					if(res.code==200){
						this.useNatureList = res.data.usingNatureDict
						this.carConditionList = res.data.vehiclePerformanceDict
						this.batteryConditionList = res.data.sanDianDict
						this.carAppearanceList = res.data.appearanceDict
						this.carInteriorList = res.data.interiorDict
					}else{
						this.$u.toast(res.message || '请求失败');
					}
				})
			},
			// 快速估值
			quickValuationStart(){
				if(!this.assessInfo.brandId){
					this.$u.toast('请选择车型');
					return false
				}
				if(!this.assessInfo.cityId){
					this.$u.toast('请选择城市');
					return false
				}
				if(this.assessInfo.date == '请选择上牌时间'){
					this.$u.toast('请选择上牌时间');
					return false
				}
				if(!this.assessInfo.mileage){
					this.$u.toast('请输入里程');
					return false
				}
				if(!this.assessInfo.mileage > 30){
					this.$u.toast('行驶里程不能大于30');
					return false
				}
				if(!this.assessInfo.fullBatteryLife){
					this.$u.toast('请输入满电续航');
					return false
				}
				if(!this.assessInfo.fullBatteryLife > this.assessInfo.miitCruisingMileage){
					this.$u.toast('您输入的续航里程不在合理范围内');
					return false
				}
				let data = {
					cityId: this.assessInfo.cityId,
					brandId: this.assessInfo.brandId,
					seriesId: this.assessInfo.seriesId,
					modelId: this.assessInfo.modelId,
					regDate: this.assessInfo.date+ '-01',
					mile: this.assessInfo.mileage,
					fullyChargedEndurance: this.assessInfo.fullBatteryLife
				}
				API.getFastValuation(data).then(res=>{
					if(res.code==200){
						uni.navigateTo({
							url:`./mianfeiReportDetail?data=${encodeURIComponent(JSON.stringify(res.data))}`
						})
					}else{
						if(res.message == 'token验证失效'){
							res.message ="未登录"
						}
						this.$u.toast(res.message || '请求失败');
					}
				})
			},
			// 选择地址
			openLevel() {
				var that = this
				if(that.current ==0){
					if(that.assessInfo.carModel =='请选择'){
						that.$u.toast('请优先选择具体车型');
						return false
					}
					 that.$refs.levelLinkage.open();
				}
				if(that.current == 1){
					if(that.assessInfo2.carModel =='请选择'){
						that.$u.toast('请优先选择具体车型');
						return false
					}
					 that.$refs.levelLinkage.open();
				}
		
			   
			},
			// 确认选择
			onConfirm(e) {
				if(this.current==0){
					this.assessInfo.addresss = e.secondPick.name
					this.assessInfo.cityId = e.secondPick.code
				}else if(this.current==1){
					this.assessInfo2.addresss = e.secondPick.name
					this.assessInfo2.cityId = e.secondPick.code
				}else{
					this.assessInfo3.addresss = e.secondPick.name
					this.assessInfo3.cityId = e.secondPick.code
				}
			},
			// 切换tab名称
			change(index) {
				this.current = index;
				getApp().globalData.carType = ""
				this.assessInfo = {
					carModel: '请选择车型',
					addresss: '请选择地区',
					cityId:'',
					date: '请选择上牌时间',
					mileage: '',
					fullBatteryLife: '',
					transferTimes: '',
				}
				this.assessInfo2 = {
					carModel: '请选择',
					brandId: '',
					seriesId:'',
					modelId:'',
					addresss: '请选择',
					cityId:'',
					date: '请选择首次上牌',
					mileage: '',
					fullBatteryLife: '',
					transferTimes: '',
					useNature: '请选择使用性质', 
					useNatureId:'',
					carColor: '请选择车身颜色',
					batteryCondition: '请选择三电情况',
					batteryConditionId: '',
					carAppearance: '请选择外观情况',
					carAppearanceId:'',
					carInterior: '请选择内饰情况',
					carInteriorId:'',
					carCondition: '请选择整车性能',
					carConditionId:''
				}
				this.assessInfo3 = {
					vinCode: '',
					carModel: '请选择车型',
					brandId: '',
					seriesId:'',
					modelId:'',
					addresss: '请选择地区',
					cityId:'',
					date: '请选择首次上牌',
					mileage: '', //行驶里程
					useNature: '请选择', //使用性质
					transferTimes: '', //过户次数
					fullBatteryLife: '', //过户次数
				}
			},
			// 选择车型
			clickCar() {
				uni.navigateTo({
					url: "../selectCar/selectCar"
				})
			},
			// 选择日期
			clickDate() {
				console.log(this.current);
				if(this.current == 0){
					console.log(this.assessInfo.carModel);
					if(this.assessInfo.carModel =='请选择'){
						this.$u.toast('请优先选择具体车型');
						return false
					}
					let date = new Date();
					this.defaultTime = date.getFullYear() + '/' + (date.getMonth() + 1);
					this.showDate = true;
				}
				else if(this.current == 1){
					if(this.assessInfo2.carModel =='请选择'){
						this.$u.toast('请优先选择具体车型');
						return false
					}
					let date = new Date();
					this.defaultTime = date.getFullYear() + '/' + (date.getMonth() + 1);
					this.showDate = true;
				}
				
				
			},
			// 日期确定
			confirmDate(date) {
				console.log(date)
				if (this.current === 0) {
					this.assessInfo.date = date.year + '/' + date.month 
					if(this.assessInfo.date.substring(0,4) < this.assessInfo.modelYear){
							this.$u.toast('请检查首次上牌时间是否正确');
							this.assessInfo.date = "请选择";
							return false
					}
				} else if (this.current === 1) {
					this.assessInfo2.date = date.year + '/' + date.month
					if(this.assessInfo2.date.substring(0,4) < this.assessInfo2.modelYear){
							this.$u.toast('请检查首次上牌时间是否正确');
							this.assessInfo2.date = "请选择";
							return false
					}
				} else {
					this.assessInfo3.date = date.year + '/' + date.month
				}
			},
			// 选择弹出
			clickPopup(title, list,key,temp) {
				this.showPopup = true
				this.popupList = list
				this.popupTitle = title
				this.keyData = key
				this.qufen = temp
			},
			getData(data){
				this.showPopup = false
				if(this.qufen==='3'){
					this.assessInfo3[this.keyData] = data.name1
					this.assessInfo2[this.keyData+'Id'] = data.code
				}else{
					this.assessInfo2[this.keyData] = data.name1
					this.assessInfo2[this.keyData+'Id'] = data.code
				}
			},
			// 车身颜色
			clickCarColor(title) {
				this.showCarColor = true
			},
			getCarColor(data){
				this.showCarColor = false,
				this.assessInfo2.carColor = data.name
			},
			// vin码
			scanCode() {
				var that = this;
				uni.scanCode({
					success: function(res) {
						console.log(res)
					}
				});
			},
			// 精准定价下的样例
			goJingzhunExample(){
				uni.navigateTo({
					url:'./jingzhunExampleDetail'
				})
			},
			// 精准定价下的估值报告
			goJingzhunReport(){
				if(!this.assessInfo2.brandId){
					this.$u.toast('请选择车型');
					return false
				}
				if(!this.assessInfo2.cityId){
					this.$u.toast('请选择城市');
					return false
				}
				if(this.assessInfo2.date == '请选择首次上牌'){
					this.$u.toast('请选择上牌时间');
					return false
				}
				if(!this.assessInfo2.mileage){
					this.$u.toast('请输入里程');
					return false
				}
				if(!this.assessInfo2.mileage > 30){
					this.$u.toast('行驶里程不能大于30');
					return false
				}
				if(!this.assessInfo2.fullBatteryLife){
					this.$u.toast('请输入满电续航');
					return false
				}
				if(!this.assessInfo2.fullBatteryLife > this.assessInfo2.miitCruisingMileage){
					this.$u.toast('您输入的续航里程不在合理范围内');
					return false
				}
				if(!this.assessInfo2.carConditionId){
					this.$u.toast('请选择整车性能');
					return false
				}
				if(!this.assessInfo2.batteryConditionId){
					this.$u.toast('请选择三电情况');
					return false
				}
				if(!this.assessInfo2.carInteriorId){
					this.$u.toast('请选择内饰情况');
					return false
				}
				if(!this.assessInfo2.carAppearanceId){
					this.$u.toast('请选择外观情况');
					return false
				}
				if(!this.assessInfo2.useNatureId){
					this.$u.toast('请选择使用性质');
					return false
				}
				if(!this.assessInfo2.carColor){
					this.$u.toast('请选择车身颜色');
					return false
				}
				if(this.assessInfo2.transferTimes == ''){
					this.$u.toast('请输入过户次数');
					return false
				}
				let data = {
					cityId:	this.assessInfo2.cityId,
					brandId: this.assessInfo2.brandId,
					seriesId: this.assessInfo2.seriesId,
					modelId: this.assessInfo2.modelId,
					carRegistrationTime: this.assessInfo2.date + '-01',
					mileage: this.assessInfo2.mileage,
					rechargeMileage: this.assessInfo2.fullBatteryLife,
					vehiclePerformance: this.assessInfo2.carConditionId,
					sanDian: this.assessInfo2.batteryConditionId,
					interior: this.assessInfo2.carInteriorId,
					appearanceinterior: this.assessInfo2.carAppearanceId,
					usingNature: this.assessInfo2.useNatureId,
					appearanceColor: this.assessInfo2.carColor,
					numberOfTransfers: this.assessInfo2.transferTimes,
					
					// cityId: 1,
					// brandId: 3336,
					// seriesId: 9364,
					// modelId: 46694,
					// carRegistrationTime: '2021-08-01',
					// mileage: 4,
					// rechargeMileage: 4,
					// vehiclePerformance: 3,
					// sanDian: 3,
					// interior: 1,
					// appearanceinterior: 2,
					// usingNature: 4,
					// appearanceColor: '银色',
					// numberOfTransfers: 4,
				}
				API.getValuationReport(data).then(res=>{
					if(res.code==200){
						uni.navigateTo({
							url:`./jingzhunReportDetail?data=${encodeURIComponent(JSON.stringify(res.data))}`
						})
					}else{
						this.$u.toast(res.message || '请求失败');
					}
				})
			},
			// 车况定价下的样例
			goExample(){},
			// 车况定价下的估值报告
			goReport(){}
		}
	};
</script>
<style scoped lang="scss">
	.precisePricing{
		padding-bottom: 20rpx;
	}
	.padding32 {
		margin: 32rpx;
		/* border-radius: 20rpx; */
		/* overflow: hidden; */
	}

	.quickValuation {
		/* margin-top: 20rpx; */
	}

	.poppupBox {
		padding: 20rpx;
	}



	.poppupBoxlist {
		.poppupBoxlist-li{
			padding: 10rpx;
			border: 1px solid;
			margin-bottom: 20rpx;
			border-radius: 10rpx;
			color: #333;
			border-color: #333;
		}
		.colorAcitv{
			&:nth-child(1){
				border-color: #32CD32 !important;
				.title-color{
					color: #32CD32 !important;
				}
			}
			&:nth-child(2){
				border-color: #1E90FF !important;
				.title-color{
					color: #1E90FF !important;
				}
			}
			&:nth-child(3){
				border-color: #DAA520 !important;
				.title-color{
					color: #DAA520 !important;
				}
			}
			&:nth-child(4){
				border-color: #ff0000 !important;
				.title-color{
					color: #ff0000 !important;
				}
			}
		}
	}

	
	
	.popupTitleStyle {
		border-bottom: 1px solid #ccc;
		text-align: center;
		margin-bottom: 30rpx;
		padding-bottom: 10rpx;
	}

	.carBox {
		display: flex;
		/* justify-content: center; */
		flex-wrap: wrap;
		justify-items: center;
		text-align: center;
		margin-bottom: 20rpx;
	}

	.carBoxlist {
		padding: 14rpx 46rpx;
		margin: 2% ; 
		// box-shadow: 1px 2px 4px 0 #0000006b;
		color: #fff;
		text-shadow: 2px 1px 11px #000;
		border-radius: 10rpx;
	}

	.jingzhunButton {
		margin-bottom: 60rpx;
	}

	.searchContext {
		background: #fff;
		display: flex;
		padding: 0 32rpx;
		font-size: 40rpx;
	}
	.uploadTxt{
		position: absolute;
		    bottom: 40rpx;
		    color: #fff;
		    font-size: 24rpx;
		    width: 100%;
		    text-align: center;
		}
</style>
